import Vue from 'vue';
import axios from 'axios';
import App from './App.vue';
import router from './router/index';

import eui from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(eui);

import api from '@/utils/api';
Vue.use(api);

import data from '@/utils/data';
Vue.use(data);

import Cloudbase from "@cloudbase/vue-provider"
Vue.use(Cloudbase, {
    env: "ysp-map-dev-3gkko1j0bea9d7b7"
})

// 万象优图
import $getImgUrl from 'lv/Util/getImgUrl';
Vue.prototype.getImg = function(url, size) {
	url = url || '';
	url = url.replace(/\?[^?]+/, '');
	size = size * document.documentElement.clientWidth / 375;
	const imgUrl = $getImgUrl({
		url,
		type: [ 'jpg', 'png', 'gif' ],
		size
	});
	return imgUrl;
};

Vue.config.productionTip = false;

new Vue({
	router,
	render: (h) => h(App)
}).$mount('#app');
